package cn.findviewbydream.evil.main.controller;

import cn.findviewbydream.evil.main.utils.WebUtil;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;

/********************************************
 * 工程名：HebeuCS
 * 包名：cn.findviewbydream.evil.main.controller
 * 时间：16-11-7 下午1:11
 * 作者：白雨濃 evil
 * 邮箱：evilbai@foxmail.com
 * 内容：获取图片
 ********************************************/
@Controller
public class ImageController
{
    @RequestMapping("/img/{img:.+}")
    public String getImg(@PathVariable("img") String img)
    {
        return WebUtil.redirect("/static/image/" + img);
    }

    @RequestMapping("/img/head/{headimg:.+}")
    public String getHeadImg(@PathVariable("headimg") String headimg)
    {
        return WebUtil.redirect("/static/image/headimg/" + headimg);
    }
}
